// This is the main DLL file.

#include "stdafx.h"

#include "HidDeviceCapabilities.h"

using namespace HidLib;
using namespace System;
using namespace System::Runtime::InteropServices;

HidDeviceCapabilities::HidDeviceCapabilities(HIDP_CAPS Caps)
{
	_Usage = Caps.Usage;
	_UsagePage = Caps.UsagePage;
	_InputReportByteLength = Caps.InputReportByteLength;
	_OutputReportByteLength = Caps.OutputReportByteLength;
	_FeatureReportByteLength = Caps.FeatureReportByteLength;
	_NumberLinkCollectionNodes = Caps.NumberLinkCollectionNodes;
	_NumberInputButtonCaps = Caps.NumberInputButtonCaps;
	_NumberInputValueCaps = Caps.NumberInputValueCaps;
	_NumberInputDataIndices = Caps.NumberInputDataIndices;
	_NumberOutputButtonCaps = Caps.NumberOutputButtonCaps;
	_NumberOutputValueCaps = Caps.NumberOutputValueCaps;
	_NumberOutputDataIndices = Caps.NumberOutputDataIndices;
	_NumberFeatureButtonCaps = Caps.NumberFeatureButtonCaps;
	_NumberFeatureValueCaps = Caps.NumberFeatureValueCaps;
	_NumberFeatureDataIndices = Caps.NumberFeatureDataIndices;

	int ResLen = sizeof(Caps.Reserved)/sizeof(USHORT);
	_Reserved = gcnew array<UInt16>(ResLen);
	for(int i = 0; i < ResLen; i++)
	{
		_Reserved[i] = Caps.Reserved[i];
	}
}